/*
 * Copyright 2016 Wealth Inc. All rights reserved.
 */
 package com.wealth.commodity.service;

import java.util.List;

import iaas.service.IBaseService;

import org.springframework.stereotype.Component;

import com.wealth.commodity.entity.Goods;
import com.wealth.commodity.entity.Purrestrictions;

/**
 * @author chan
 * @version 1.0
 * @since 1.0
 */
 
public interface IPurrestrictionsService extends IBaseService<Purrestrictions>{
	
	/**
	 * 验证购买的商品是否超过限额
	 * @param goods
	 * @param amount
	 * @return
	 */
	public boolean checkPurRestrictions(Goods goods,Integer amount);
	
	/**
	 * 根据会员和商品ID查询限额数量
	 * @param memberId
	 * @param goodsId
	 * @return
	 */
	public int findByMemberIdAndGoodsId(Long memberId,Long goodsId);
	
}
